<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib prefix="error" uri="/WEB-INF/tags/ErrorTag.tld"%>
<%@taglib prefix="t" tagdir="/WEB-INF/tags"%>


<t:basicTemplate pageTitle="SWIMv2 - ${userName} - Home">
	<jsp:attribute name="extrahead">
		<link rel='stylesheet' href='css/user.css' type='text/css' />
		<script type="text/javascript" src="script/newMessageAjax.js"></script>
		<script type="text/javascript" src="scrip/jq.js"></script>
		<script type="text/javascript" src="script/jquery.dNotify.js"></script>
		<link rel="stylesheet" type="text/css" href="script/dNotify.css"
			media="screen" />
	</jsp:attribute>
	<jsp:body>
       <h2>${userName}'s Home</h2>
        
	<t:errorAndMessage message="Wellcome ${userName}!" />
	
	<div class="error-style">
		<error:errors error="${param.error}"></error:errors>
	</div>
	
	

	<!-- research  -->
	<%@include file="../search/SearchForm.jsp"%>
	
	<!-- Abilities -->
	<h3>Your abilities</h3>
	<ul>
		<c:forEach var="ability" items="${abilitiesMap}">
	    	<li>
	    		<details>
					<summary>Name: ${ability.key}</summary>
					<p>${ability.value}</p>
				</details>
			</li>
	    </c:forEach>
    </ul>
    <br />
    
    <h3>Add abilities</h3>
    <form method="get" action="addAbility">
    	<select name="toAddAbility">
    		<c:forEach var="ability" items="${abilitiesInSystemMap}">
    			<option value="${ability.key}">${ability.key}</option>
    		</c:forEach>
    	</select>
    	<input type="submit" value="add" />
    </form>
    <br />
	
	<h3>Modify your profile</h3>
	<p>Go <a href="./modify">HERE</a> to modify your personal data</p>
	
	<h3>Delete account</h3>
	<p> To delete your account, you should click <a
				href="./deleteAccount">here</a>
		</p>
	
	<c:if test="${sessionScope.user_type == 'admin'}">
		<div id="admin_links">
    		<ul>
				<li><a href="./administration">Admininstration</a></li>

				<li><a href="./seeAbilityRequest">Requested Abilities</a></li>
				
				<li><a href="./disputedFeedback">Disputed Feedbacks</a></li>
			</ul>
		  </div>
	</c:if>
    
   

    </jsp:body>
</t:basicTemplate>